import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {StockStatisticComponent} from './stock-statistic/stock-statistic.component';

const routes: Routes = [
  {
    path: '',
    children: [
      {
        path: 'stock-statistic/:secondaryType',
        component: StockStatisticComponent,
        data: {title: '库存统计', module: '/stock/stock-statistic/:-1', power: 'SHOW'}
      },
      {
        path: 'stock-statistic-shipment/:secondaryType',
        component: StockStatisticComponent,
        data: {title: '出货统计', module: '/stock/stock-statistic/:10', power: 'SHOW'}
      },
      {
        path: 'stock-statistic-offering-gifts/:secondaryType',  // 将参数 :giftType 加入路径中
        component: StockStatisticComponent,
        data: {title: '出礼统计', module: '/stock/stock-statistic/:6', power: 'SHOW'}
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class StockRoutingModule { }
